Time formatting and storage bugs